<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>01</title>
</head>
<style>
    .box1{
        width: 200px;
        height: 300px;
       overflow: hidden;
        margin: 10px auto;
    }
    .box1:hover .box2{
        background-color: rgba(0,0,0, 0.2);
        transform: translateY(-120px);
    }
    .box2{
        transition: all 2s;
           
    }
   span{
       display: inline-block;
       top: 30px;
       margin: 0px 5px 5px 5px; 
   }
</style>
<body>
    <div class="box1">
        <img src="水果.jpg">
        <div class="box2">
        <span>
       <h2>文字标题</h2>
        图片文字说明,图片文字说明图片文字说明
    </span>
        </div>
    </div>
</body>
</html>